<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .data{
            border: 1px solid #000;
            width: 200px;
            height: 200px;
        }
    </style>
</head>
<body>
    <input type="text" placeholder="请输入内容" id="value1"/>
    <button>添加</button>
    <div class="data">
        王子初真的很强<br/>
    </div>
    <script>
        let inputValue = document.getElementById('value1')
        let btn = document.getElementsByTagName('button')[0]
        let dataValue = document.getElementsByClassName('data')[0]
        btn.onclick  = function(){
            dataValue.innerHTML += inputValue.value+'<br/>'
            inputValue.value = ''
        }
    </script>
</body>
</html>